CREATE TABLE [dbo].[LoanFeasabilityStudy](
	[LoanFeasabilityStudyID] [uniqueidentifier] NOT NULL,
	[LoanID] [uniqueidentifier] NOT NULL,
	[FeasabilityStudyDate] [datetime] NOT NULL,
	[RevenueAmount] [float] NOT NULL,
	[CostAmount] [float] NOT NULL,
	[ProfitAmount] [float] NOT NULL,
	[ReturnOnInvestmentPercent] [decimal](5, 2) NOT NULL,
	[LoanAmount] [float] NOT NULL,
	[LoanPaymentPeriod] [int] NOT NULL,
	[Notes] [nvarchar](max) NULL,
	[LoanPaymentMethodID] [uniqueidentifier] NOT NULL,
 CONSTRAINT [PK_LoanFeasabilityStudy] PRIMARY KEY CLUSTERED 
(
	[LoanFeasabilityStudyID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]


GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ايرادات' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'LoanFeasabilityStudy', @level2type=N'COLUMN',@level2name=N'RevenueAmount'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'تكلفة' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'LoanFeasabilityStudy', @level2type=N'COLUMN',@level2name=N'CostAmount'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Calculated from the previous 2 fields' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'LoanFeasabilityStudy', @level2type=N'COLUMN',@level2name=N'ProfitAmount'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'العائد على الاستثمار' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'LoanFeasabilityStudy', @level2type=N'COLUMN',@level2name=N'ReturnOnInvestmentPercent'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'رأى المسئول الميدانى فى قيمة المستحقة للقرض' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'LoanFeasabilityStudy', @level2type=N'COLUMN',@level2name=N'LoanAmount'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'عدد أشهر السداد' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'LoanFeasabilityStudy', @level2type=N'COLUMN',@level2name=N'LoanPaymentPeriod'

